package edu.cqie.smartfarm.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

@Data
@ApiModel(value="登录对象", description="")
public class LoginDTO {
    @ApiModelProperty(value = "登录账号，字符串类型，确保唯一性，用于用户登录验证，非空")
    @NotNull(message = "登录账号不能为空") // 登录账号不能为空
    @Size(min = 1, max = 20, message = "登录账号长度在1-20位之间")
    private String username;

    @ApiModelProperty(value = "登录密码")
    @NotNull(message = "登录密码不能为空")
    @Size(min = 1, max = 20, message = "密码长度在1-20位之间")
    private String password;
}
